package com.ossjk.qlh.system.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ossjk.core.base.entity.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * token表
 * </p>
 *
 * @author chair
 * @since 2020-04-04
 */
@ApiModel(value = "token")
public class Token extends BaseEntity<Token> {

	private static final long serialVersionUID = 1L;

	/**
	 * 用户id
	 */
	@ApiModelProperty(value = "用户id", required = true)
	@TableField("uid")
	private String uid;
	@ApiModelProperty(value = "token", required = true)
	@TableField("token")
	private String token;
	/**
	 * 时效
	 */
	@ApiModelProperty(value = "时效", required = true)
	@TableField("duration")
	private Date duration;
	/**
	 * 表达式
	 */
	@ApiModelProperty(value = "表达式", required = true)
	@TableField("expression")
	private String expression;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Date getDuration() {
		return duration;
	}

	public void setDuration(Date duration) {
		this.duration = duration;
	}

	public String getExpression() {
		return expression;
	}

	public void setExpression(String expression) {
		this.expression = expression;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Token{" + ", id=" + id + ", uid=" + uid + ", token=" + token + ", duration=" + duration + ", expression=" + expression + "}";
	}
}
